#include <walle/algo/lexical_cast.h>

using namespace walle;

int main()
{
	oneof_reader<int> intone = oneof(1,2,3,4,5);
	int v;
	bool ret = intone("6", v);
	if(!ret) {
		std::cout<<"not exists "<< "6"<<std::endl;
	}
	ret = intone("5", v);
	if(!ret) {
		std::cout<<"not exists"<<" 5"<<std::endl;	
	}
	ret = intone(3);
	if(ret) {
		std::cout<<3<<" exists"<<std::endl;
	}
	std::cout<<"pass"<<std::endl;
	return 0;
}